/// <reference path='../_all.ts' />

module PiiS {
    'use strict';

    /**
      *   The main controller for the app. The controller:
      *   - Downloads the list of all movies.
      *   - Performs rating.
      */
    export interface IMainScope extends ng.IScope {

        /**
          * Defines if the movie list is loading or not.
          */
        loading: boolean;

        /**
          * Data of the logged in user.
          */
        loggedPerson: Person;

        /**
          * The list of movies to rate.
          */
        movieList: Movie[];

        /**
          * Number of users registered in the system.
          */
        registeredUsers: number;

        /**
          * Number of votes registered in the system.
          */
        votesCast: number;

        /**
          * Downloads whole movie list from the remote server.
          */
        GetMovieList: () => void;

        /**
          * Assigns a rating for a given movie/person pair.
          */
        RateMovie: (movie: Movie, value: number) => void;
    }
}